package com.day5.t5;

public class Main {
    public int subarraySum(int[] nums, int k) {
        int r=0,sum=0,cnt=0;
        for (int i = 0; i < nums.length; i++) {
            if(sum==k){
                cnt++;
                sum=0;
            }
        }
        return cnt;
    }
}
